<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/core" prefix="c"%>
<html:form action="/adjustValuesToVersionBalanceSave">
	<table width="<bean:write name="totalSize"/>" align="center" border="0">
		<tr>
			<td style="width: 100%" align="center">
				<table width="100%" align="center" border="0" cellspacing="1" bgcolor="#CCCCC0">
					<logic:present name="BalanceVersionForm" property="balanceVersionList">						
							<tr class="columnadatoPar">
								<td width="147">
									<table width="100%" align="center" border="0" cellspacing="0" bgcolor="#CCCCC0">
										<tr class="columnadatoPar">
											<td height="20">
												<logic:notEmpty name="BalanceVersionForm" property="balanceVersionList">							 
													<bean:message key="label.versions.adjustValuesToVersionBalance.actual"/>:
												</logic:notEmpty>	
											</td>
										</tr>
										<tr class="columnadatoPar">
											<td height="20">
												<logic:notEmpty name="BalanceVersionForm" property="balanceVersionList">							 
													<bean:message key="label.versions.adjustValuesToVersionBalance.version"/>:
												</logic:notEmpty>	
											</td>
										</tr>
										<tr class="columnadatoPar">
											<td height="20">
												<logic:notEmpty name="BalanceVersionForm" property="balanceVersionList">							 
													<bean:message key="label.versions.adjustValuesToVersionBalance.total"/>:
												</logic:notEmpty>	
											</td>
										</tr>
										<tr class="columnadatoPar">
											<td height="20">
												<logic:notEmpty name="BalanceVersionForm" property="balanceVersionList">							 
													<bean:message key="label.versions.adjustValuesToVersionBalance.limit"/>:
												</logic:notEmpty>	
											</td>
										</tr>
										<tr class="columnadatoPar">
											<td height="20">
												<logic:notEmpty name="BalanceVersionForm" property="balanceVersionList">							 
													<bean:message key="label.versions.adjustValuesToVersionBalance.limit.overdraw"/>:
												</logic:notEmpty>	
											</td>
										</tr>
										<tr class="columnadatoPar">
											<td height="20">
												<logic:notEmpty name="BalanceVersionForm" property="balanceVersionList">							 
													<bean:message key="label.credit.line.tax1"/>
												</logic:notEmpty>	
											</td>
										</tr>
										<tr class="columnadatoPar">
											<td height="20">
												<logic:notEmpty name="BalanceVersionForm" property="balanceVersionList">							 
													<bean:message key="label.credit.line.tax2"/>
												</logic:notEmpty>	
											</td>
										</tr>
										<tr class="columnadatoPar">
											<td height="20">
												<logic:notEmpty name="BalanceVersionForm" property="balanceVersionList">							 
													<bean:message key="label.versions.adjustValuesToVersionBalance.overdraw"/>
												</logic:notEmpty>	
											</td>
										</tr>
									</table>
								</td>
								<logic:present name="BalanceVersionForm" property="balanceVersionList">			  		
									<logic:iterate name="BalanceVersionForm" property="balanceVersionList" id="row" indexId="int_i" >
										<td>
											<input type="text" name='balanceVersionList[<c:out value="${int_i}"/>].balance' onfocus="this.select();" value='<c:out value="${row.balance}"/>' onkeydown="return (numeric(event, 1) && noPaste(event, this));" onkeyup="extractNumber(this,4,false);" class="columnanumero" size="20" /><br />
											
											<input type="text" name='balanceVersionList[<c:out value="${int_i}"/>].balanceVersion' onfocus="this.select();" value='<c:out value="${row.balanceVersion}"/>' onkeydown="return (numeric(event, 1) && noPaste(event, this));" onkeyup="extractNumber(this,4,false);" class="columnanumero" size="20" disabled="true" /><br />
											<input type="text" name='balanceVersionList[<c:out value="${int_i}"/>].balanceTotal' onfocus="this.select();" value='<c:out value="${row.balanceTotal}"/>' onkeydown="return (numeric(event, 1) && noPaste(event, this));" onkeyup="extractNumber(this,4,false);" class="columnanumero" size="20" disabled="true" /><br />
											
											<input type="text" name='balanceVersionList[<c:out value="${int_i}"/>].amount' value='<c:out value="${row.amount}"/>' onfocus="this.select();" onkeydown="return (numeric(event, 1) && noPaste(event, this));" onkeyup="extractNumber(this,4,false);" class="columnanumero" size="20" /><br />
											<input type="text" name='balanceVersionList[<c:out value="${int_i}"/>].amountWithOutOfCredit' value='<c:out value="${row.amountWithOutOfCredit}"/>'  class="columnanumero" size="20"  disabled="true"/><br />
											<input type="text" name='balanceVersionList[<c:out value="${int_i}"/>].libor' value='<c:out value="${row.libor}"/>' onfocus="this.select();" onkeydown="return (numeric(event, 1) && noPaste(event, this));" onkeyup="	(this,2,false);" class="columnanumero" size="20" /><br />
											<input type="text" name='balanceVersionList[<c:out value="${int_i}"/>].spread' value='<c:out value="${row.spread}"/>' onfocus="this.select();" onkeydown="return (numeric(event, 1) && noPaste(event, this));" onkeyup="extractNumber(this,2,false);" class="columnanumero" size="20" /><br />
											<input type="text" name='balanceVersionList[<c:out value="${int_i}"/>].outOfCredit' value='<c:out value="${row.outOfCredit}"/>' onfocus="this.select();" onkeydown="return (numeric(event, 1) && noPaste(event, this));" onkeyup="extractNumber(this,2,false);" class="columnanumero" size="20" /><br />																																																																																																																																																																																																																																																
										</td>
									</logic:iterate>
								</logic:present>
							</tr>						
					</logic:present>
					<tr>
						<td align="left" colspan="<bean:write name="totalPeriods"/>" height="30" class="etiqueta_campo">						
							<logic:notEmpty name="BalanceVersionForm" property="balanceVersionList">
								<html:submit styleClass="boton"><bean:message key="label.common.save"/></html:submit>
							</logic:notEmpty>
							<html:button property="cancel" onclick="location.href = 'showVersionDetail.do'" styleClass="boton"><bean:message key="label.common.cancel"/></html:button>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</html:form>